/**
 * 税额计算器
 */
import javax.swing.plaf.synth.SynthLabelUI;
import java.util.Scanner;
public class JiaoShui {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String word;
        System.out.println("-----应纳税额计算器----");
        while (true){
            System.out.println("请输入月薪");
            double monthSalary = s.nextInt();
            double jiao = monthSalary - 5000;//应纳税所得额（各项社会保险费=0）
            double shui = 0;//应纳税额
            if(monthSalary>=0) {
                if (jiao < 0) {
                    System.out.println("个税起点为5000元，不需要纳税");
                } else if (jiao <= 3000) {
                    shui = jiao * 0.03;
                    monthSalary -= shui;
                } else if (jiao <= 12000) {
                    shui = jiao * 0.1 - 210;
                    monthSalary -= shui;
                } else if (jiao <= 25000) {
                    shui = jiao * 0.2 - 1410;
                    monthSalary -= shui;
                } else if (jiao <= 55000) {
                    shui = jiao * 0.25 - 2660;
                    monthSalary -= shui;
                } else if (jiao <= 80000) {
                    shui = jiao * 0.45 - 15160;
                    monthSalary -= shui;
                }
                System.out.println("应纳税所得额：" + jiao + "元\t" + "纳税税额" + shui + "元\t"
                        + "实发工资" + monthSalary + "元");
               /* System.out.println("输入88退出程序");
                int cmd = s.nextInt();
                if (cmd == 88) {
                    System.out.println("程序结束，退出！");
                    break;
                } else {
                    continue;
                }*/
              /*  System.out.println("输入exit，退出系统！");
                word=s.nextLine();
                if(word.equals("exit")){
                    System.out.println("系统退出:");
                    break;
                }else {
                    System.out.println("请输入：");
                }*/
            }else {
                System.out.println("对不起，你输入的是负数！不符合需求！");
            }
        }
    }
}
